package com.moon.interface_api.controller;


import com.moon.interface_api.response.Result;
import com.moon.interface_api.service.ThreadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/thread")
public class ThreadTestController {
    
    @Autowired
    ThreadService threadService;
    
    @RequestMapping("test")
    public Result testThread(){
        System.out.println(Thread.currentThread().getName()+"----------开始运行controller");
        String s = threadService.test();
        System.out.println(Thread.currentThread().getName()+"----------结束运行controller");
        return Result.success("sss");
    }
}
